package org.anupta.realm.server.realm.packet.login.error;

import org.anupta.realm.main.Main;
import org.anupta.realm.server.realm.client.RealmClient;
import org.anupta.realm.server.realm.packet.RealmPacket;
import org.anupta.realm.utils.others.Config;

public class RequiredVersion extends RealmPacket {

	public RequiredVersion(RealmClient client) {
		super(client);
		pack();
		doPacket();
	}

	@Override
	public void unpack() {
	}

	@Override
	public void pack() {
		packetOut.append("AlEv").append(Config.VERSION);
	}

	@Override
	public void doPacket() {
		client.send(packetOut.toString());
		Main.err.write(new StringBuilder("RequiredVersion error packet sended to : ").append(client.getIp()).toString());
		client.quit();
	}
}
